<script setup>
defineProps({
  modelValue: {
    type: Number,
    default: 10
  },
  num: {
    type: Number,
    default: 1
  }
})

const emit = defineEmits(['update:modelValue', 'update:num'])
const updateAge = () => {
  emit('update:modelValue', 80)
}

const updateNum = () => {
  emit('update:num', 100)
}
</script>
<template>
  <div>
    <div>Child: {{ modelValue }}</div>
    <div>Child: {{ num }}</div>
    <button @click="updateAge">update age</button>
    <button @click="updateNum">update num</button>
  </div>
</template>
